<?php

if ($dir = opendir("./svg/"))
{
	while (($file = readdir($dir)) !== false)
	{
	    if ( $file != "." && $file != ".." )
		$files[]=$file; 
	}
	closedir($dir);
	asort($files);
	echo "<table border=\"1\" ><tr><td> 產生時間 </td><td> 名稱 </td></tr>";
	foreach($files as $name){
		$filebasename = basename( $name , ".svg");
		$filectime = date("Y-m-d G:i:s" , filectime("./svg/".$name));
		echo "<tr>";
		echo "<td>  $filectime </td>" . "<td><a href=\"./svg/$name\">".$filebasename. " </a></td> ";
		echo "</tr>";
	} 	
	echo "</table>";
}
?>
